package com.ruoyi.front.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.front.mapper.ClasssicCasesProposalMapper;
import com.ruoyi.front.domain.ClasssicCasesProposal;
import com.ruoyi.front.service.IClasssicCasesProposalService;
import com.ruoyi.common.core.text.Convert;

/**
 * 典型案例问题解决建议Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-11-07
 */
@Service
public class ClasssicCasesProposalServiceImpl implements IClasssicCasesProposalService 
{
    @Autowired
    private ClasssicCasesProposalMapper classsicCasesProposalMapper;

    /**
     * 查询典型案例问题解决建议
     * 
     * @param id 典型案例问题解决建议ID
     * @return 典型案例问题解决建议
     */
    @Override
    public ClasssicCasesProposal selectClasssicCasesProposalById(Long id)
    {
        return classsicCasesProposalMapper.selectClasssicCasesProposalById(id);
    }

    /**
     * 查询典型案例问题解决建议列表
     * 
     * @param classsicCasesProposal 典型案例问题解决建议
     * @return 典型案例问题解决建议
     */
    @Override
    public List<ClasssicCasesProposal> selectClasssicCasesProposalList(ClasssicCasesProposal classsicCasesProposal)
    {
        return classsicCasesProposalMapper.selectClasssicCasesProposalList(classsicCasesProposal);
    }

    /**
     * 新增典型案例问题解决建议
     * 
     * @param classsicCasesProposal 典型案例问题解决建议
     * @return 结果
     */
    @Override
    public int insertClasssicCasesProposal(ClasssicCasesProposal classsicCasesProposal)
    {
        classsicCasesProposal.setCreateTime(DateUtils.getNowDate());
        return classsicCasesProposalMapper.insertClasssicCasesProposal(classsicCasesProposal);
    }

    /**
     * 修改典型案例问题解决建议
     * 
     * @param classsicCasesProposal 典型案例问题解决建议
     * @return 结果
     */
    @Override
    public int updateClasssicCasesProposal(ClasssicCasesProposal classsicCasesProposal)
    {
        classsicCasesProposal.setUpdateTime(DateUtils.getNowDate());
        return classsicCasesProposalMapper.updateClasssicCasesProposal(classsicCasesProposal);
    }

    /**
     * 删除典型案例问题解决建议对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteClasssicCasesProposalByIds(String ids)
    {
        return classsicCasesProposalMapper.deleteClasssicCasesProposalByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除典型案例问题解决建议信息
     * 
     * @param id 典型案例问题解决建议ID
     * @return 结果
     */
    @Override
    public int deleteClasssicCasesProposalById(Long id)
    {
        return classsicCasesProposalMapper.deleteClasssicCasesProposalById(id);
    }
}
